package com.yanyu.space.common.im.support;

import com.yanyu.space.common.im.session.SessionFactory;
import io.netty.channel.Channel;

import java.util.List;

/**
 * @author yanyu
 */
public class ImSender {

    public static void send(List<String> usernames, String text) {
        for (String username : usernames) {
            Channel channel = SessionFactory.getSession().getChannel(username);
            channel.writeAndFlush(text);
        }
    }
}
